import requests



class TpshopLoginApi():

    @classmethod
    def get_verify(cls,session):
        session.get(url="https://hmshop-test.itheima.net/index.php?m=Home&c=User&a=verify")

    @classmethod
    def Login(cls, session,Logindata):
        resp = session.post(
            url="https://hmshop-test.itheima.net/index.php?m=Home&c=User&a=do_login",
            data=Logindata)
        return resp

# if __name__ == '__main__':
#     session=requests.Session()
#
#     TpshopLoginApi.get_verify(session)
#     response=TpshopLoginApi.Login(session,{"username":"13012345678","password":"123456","verify_code":"8888"})
#     print("登录结果:",response.json())